/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package View.ClusterizationPanel;

import java.awt.Color;
import java.util.Vector;

/**
 *
 * @author vf
 */
public class CustomOptionsClustersTableModel extends ClustersTableModel{
    CustomOptionsPanel optionsPanel;
    public CustomOptionsClustersTableModel(CustomOptionsPanel optionsPanel){
        super(new String[]{"No","Name","Color","Actions"},
              new Class[]{java.lang.Integer.class,
                          java.lang.String.class,
                          Color.class,
                          java.lang.Integer.class},
              new boolean[]{false,true,true,false});
        this.optionsPanel = optionsPanel;
    }

    public Object getValueAt(int row, int column){
        if (column == 3)
            return optionsPanel.getActionsCountAssignedTo(row);
        else {
            Vector rowVector = (Vector)dataVector.elementAt(row);
            return rowVector.elementAt(column);
        }
    }
}
